package com.itheima.practice.demo02;

import java.util.concurrent.FutureTask;

public class CallableDemo {
    public static void main(String[] args) {
        MyCallable mc = new MyCallable();
        FutureTask ft1 = new FutureTask(mc);
        FutureTask ft2 = new FutureTask(mc);
        Thread th1 = new Thread(ft1);
        Thread th2 = new Thread(ft2);
        th1.setName("被打");
        th2.setName("被夸");
//        th1.setPriority(8);
//        th2.setPriority(3);
        th1.setDaemon(true);//守护线程
        th1.start();
        th2.start();
        System.out.println(th1.getPriority());
        System.out.println(th2.getPriority());
    }
}
